(function(){"use strict";BX.namespace("BX.Landing");var n=BX.Landing.Utils.clone;var e={"Landing::addBlock":BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__ADD_BLOCK"),"Landing::deleteBlock":BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__DELETE_BLOCK"),"Landing::upBlock":BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__SAVE_CHANGES"),"Landing::downBlock":BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__SAVE_CHANGES"),"Landing::showBlock":BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__SAVE_CHANGES"),"Landing::hideBlock":BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__SAVE_CHANGES"),"Block::cloneCard":BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__CLONE_CARD"),"Block::removeCard":BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__DELETE_CARD"),"Block::updateStyles":BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__SAVE_CHANGES"),"Block::updateNodes":BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__SAVE_CHANGES"),"Site::getList":BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__SITE_GET_LIST"),"Block::getList":BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__BLOCK_GET_LIST"),"Utils::uploadFile":BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__UPLOAD_FILE"),UNKNOWN_ACTION:BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__UNKNOWN_ACTION"),BAD_IMAGE:BX.Landing.Loc.getMessage("LANDING_ACTION_ERROR__BAD_IMAGE")};BX.Landing.ErrorManager=function(){this.stack=[];this.showTimeout=null};BX.Landing.ErrorManager.getInstance=function(){var n=BX.Landing.PageObject.getRootWindow();if(!n.BX.Landing.ErrorManager.instance){n.BX.Landing.ErrorManager.instance=new BX.Landing.ErrorManager}return n.BX.Landing.ErrorManager.instance};BX.Landing.ErrorManager.prototype={add:function(n){if(n.type==="error"){n.action=n.action in e?n.action:"UNKNOWN_ACTION";this.stack.push({action:n.action,description:e[n.action],hideSupportLink:n.hideSupportLink});return this.show()}},show:function(){clearTimeout(this.showTimeout);this.showTimeout=setTimeout(function(){var e=n(this.stack);this.stack=[];var a=e.map(this.createErrorMessage,this).join("");var i=e.some(function(n){return n.hideSupportLink===true});BX.Landing.UI.Panel.Alert.getInstance().show("error",a,i)}.bind(this),100)},createErrorMessage:function(n){return'<div class="landing-ui-error-item">'+n.description+"</div>"}}})();
//# sourceMappingURL=error_manager.map.js